package com.yhy.wxzn.wcs.websocket;


import com.alibaba.fastjson.JSON;
import org.jeecg.common.api.vo.Result;

import javax.websocket.EncodeException;
import javax.websocket.Encoder;
import javax.websocket.EndpointConfig;


public class ServerEncoder implements Encoder.Text<Result<?>> {
    @Override
    public void destroy() {

    }

    @Override
    public void init(EndpointConfig arg0) {

    }


    @Override
    public String encode(Result<?> result) throws EncodeException {
        return JSON.toJSONString(result);
    }
}

